<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //反射
      let user = { name: "rose" };
      //利用反射设置user对象的name属性的值为jack
      Reflect.set(user, "name", "jack");
      let name = Reflect.get(user, "name");
      console.log(name);
    </script>
  </body>
</html>
